/* 小红书Cookie获取器 - 侧边栏悬浮窗样式 */
#xhs-cookie-sidebar {
  position: fixed;
  top: 20px;
  right: 20px;
  width: 280px;
  z-index: 9999;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Helvetica Neue", sans-serif;
  transition: none;
  /* 避免拖动时与整体容器的transition冲突 */
}

/* 关闭按钮 */
.close-button {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  z-index: 10;
  transition: transform 0.2s ease, opacity 0.2s ease;
  opacity: 0.7;
  user-select: none;
}

/* 亮色模式关闭按钮 */
#xhs-cookie-sidebar[data-theme="light"] .close-button {
  color: #666;
}

/* 暗色模式关闭按钮 */
#xhs-cookie-sidebar[data-theme="dark"] .close-button {
  color: #ccc;
}

.close-button:hover {
  opacity: 1;
  transform: scale(1.1);
}

.close-button:active {
  transform: scale(0.9);
}

/* 版本号标签 */
.version-badge {
  margin-right: 10px;
  user-select: none;
}

/* 亮色模式（默认） */
#xhs-cookie-sidebar[data-theme="light"] .xhs-cookie-container {
  background-color: rgba(255, 255, 255, 0.85);
  color: #333;
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 
    0 10px 40px rgba(0, 0, 0, 0.15),
    0 0 0 1px rgba(255, 255, 255, 0.8),
    inset 0 0 0 1px rgba(255, 255, 255, 0.5);
}

/* 暗色模式 */
#xhs-cookie-sidebar[data-theme="dark"] .xhs-cookie-container {
  background-color: rgba(30, 30, 30, 0.85);
  color: #e0e0e0;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 
    0 10px 40px rgba(0, 0, 0, 0.3),
    0 0 0 1px rgba(255, 255, 255, 0.1),
    inset 0 0 0 1px rgba(255, 255, 255, 0.05);
}

/* 亮色模式文本区域 */
#xhs-cookie-sidebar[data-theme="light"] #xhs-cookie-data {
  background: rgba(255, 255, 255, 0.5);
  color: #333;
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.03), 0 0 0 1px rgba(255, 255, 255, 0.8);
}

/* 暗色模式文本区域 */
#xhs-cookie-sidebar[data-theme="dark"] #xhs-cookie-data {
  background: rgba(45, 45, 45, 0.7);
  color: #e0e0e0;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2), 0 0 0 1px rgba(70, 70, 70, 0.5);
}

/* 状态区域 - 无背景 */
#xhs-status {
  min-height: 16px;
  padding: 8px 0;
  margin-top: 10px;
  font-size: 13px;
  text-align: center;
  transition: opacity 0.3s ease;
}

/* 亮色模式状态区域 */
#xhs-cookie-sidebar[data-theme="light"] #xhs-status {
  background: transparent;
  color: #333;
}

/* 亮色模式状态区域 - 成功状态 */
#xhs-cookie-sidebar[data-theme="light"] #xhs-status.success {
  color: #34c759;
}

/* 亮色模式状态区域 - 错误状态 */
#xhs-cookie-sidebar[data-theme="light"] #xhs-status.error {
  color: #ff3b30;
}

/* 暗色模式状态区域 */
#xhs-cookie-sidebar[data-theme="dark"] #xhs-status {
  background: transparent;
  color: #e0e0e0;
}

/* 暗色模式状态区域 - 成功状态 */
#xhs-cookie-sidebar[data-theme="dark"] #xhs-status.success {
  color: #30d158;
}

/* 暗色模式状态区域 - 错误状态 */
#xhs-cookie-sidebar[data-theme="dark"] #xhs-status.error {
  color: #ff453a;
}

/* 亮色模式底部区域 */
#xhs-cookie-sidebar[data-theme="light"] .footer {
  color: #888;
  border-top: 1px solid rgba(0, 0, 0, 0.05);
}

/* 暗色模式底部区域 */
#xhs-cookie-sidebar[data-theme="dark"] .footer {
  color: #999;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* 底部链接样式 */
.footer-link {
  text-decoration: none;
  transition: color 0.2s ease, opacity 0.2s ease;
}

/* 亮色模式底部链接 */
#xhs-cookie-sidebar[data-theme="light"] .footer-link {
  color: #ff2442;
  opacity: 0.8;
}

/* 亮色模式底部链接悬停状态 */
#xhs-cookie-sidebar[data-theme="light"] .footer-link:hover {
  opacity: 1;
  text-decoration: underline;
}

/* 暗色模式底部链接 */
#xhs-cookie-sidebar[data-theme="dark"] .footer-link {
  color: #ff4060;
  opacity: 0.8;
}

/* 暗色模式底部链接悬停状态 */
#xhs-cookie-sidebar[data-theme="dark"] .footer-link:hover {
  opacity: 1;
  text-decoration: underline;
}

/* 亮色模式标题 */
#xhs-cookie-sidebar[data-theme="light"] h2 {
  color: #ff2442;
}

/* 暗色模式标题 */
#xhs-cookie-sidebar[data-theme="dark"] h2 {
  color: #ff4060;
}

/* 按钮 - 复制成功样式 */
#xhs-cookie-sidebar[data-theme="light"] .copy-success {
  transform: scale(0.98);
  font-weight: 600;
}

#xhs-cookie-sidebar[data-theme="dark"] .copy-success {
  transform: scale(0.98);
  font-weight: 600;
}

.xhs-cookie-container {
  border-radius: 16px;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: 20px;
  animation: xhs-sidebar-slide-in 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  transform-origin: top right;
  user-select: none; /* 防止拖动时选中文字 */
  cursor: move; /* 整个容器可移动的提示 */
  position: relative; /* 确保关闭按钮定位正确 */
}

@keyframes xhs-sidebar-slide-in {
  0% {
    opacity: 0;
    transform: translateX(20px) scale(0.95);
  }
  100% {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
}

/* 拖动中样式 */
.xhs-cookie-container.dragging {
  transition: none !important;
  transform: scale(1.02);
  opacity: 0.9;
  box-shadow: 
    0 16px 50px rgba(0, 0, 0, 0.2),
    0 0 0 1px rgba(255, 255, 255, 0.8),
    inset 0 0 0 1px rgba(255, 255, 255, 0.5);
}

/* 磁吸动画样式 */
.xhs-cookie-container.snapping {
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) !important; /* 弹性曲线 */
  transform: scale(1);
  opacity: 1;
}

/* 可拖动头部样式 */
.xhs-cookie-container .header {
  cursor: grab;
}

.xhs-cookie-container .header:active {
  cursor: grabbing;
}

/* 文本区域选择样式修复 */
#xhs-cookie-data {
  user-select: text;
  cursor: text;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

/* 按钮样式 */
#xhs-copy-button {
  cursor: pointer;
  user-select: none;
  transition: all 0.3s ease;
}

/* 按钮激活样式 */
.button-active {
  transform: scale(0.95) !important;
  background-color: #d91833 !important;
}

/* 主题切换按钮 */
.theme-toggle {
  opacity: 0.7;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.theme-toggle:hover {
  opacity: 1;
  transform: scale(1.1);
} 